@typeparam TItem
<table>
    @if (Header != null)
    {
        <thead>
            @Header
        </thead>
    }
    <tbody>
        @for (var i  = 0; i < Items.Count; i++)
        {
            var item = Items[i];
            @ItemTemplate(item)
        }

    </tbody>
    @if (Footer != null)
    {
        <tfoot>@Footer</tfoot>
    }
</table>

@functions {
    [Parameter]
    RenderFragment Header { get; set; }

    [Parameter]
    RenderFragment<TItem> ItemTemplate { get; set; }

    [Parameter]
    RenderFragment Footer { get; set; }

    [Parameter]
    IReadOnlyList<TItem> Items { get; set; }
}